import config from "@/config"
import http from "@/utils/request"

export default {
	add: {
		url: `${config.API_URL}/jjMenu/add`,
		name: "添加菜单",
		post: async function(data){
			return await http.post(this.url, data);
		}
	},
	edit: {
		url: `${config.API_URL}/jjMenu/modify`,
		name: "修改菜单",
		post: async function(data){
			return await http.post(this.url, data);
		}
	},
	list: {
		url: `${config.API_URL}/jjMenu/getJjMenuPage`,
		name: "菜单列表",
		get: async function(params){
			return await http.get(this.url, params);
		}
	},
	notPageList: {
		url: `${config.API_URL}/jjMenu/findAllMenuList`,
		name: "菜单列表（不分页）",
		get: async function(params){
			return await http.get(this.url, params);
		}
	},
	getJjRoleMenuById: {
		url: `${config.API_URL}/jjRole/getJjRoleMenuById`,
		name: "根据角色id查询菜单",
		get: async function(params){
			return await http.get(this.url, params);
		}
	},
	delete: {
		url: `${config.API_URL}/jjMenu/delete`,
		name: "删除菜单",
		post: async function(params){
			return await http.post(this.url, params);
		}
	}
}
